package com.shitou.shitoumember.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shitou.shitoucommons.utils.PageUtils;
import com.shitou.shitoucommons.utils.RespBean;
import com.shitou.shitoumember.entity.MemberReceiveAddressEntity;

import java.util.Map;

/**
 * 会员收货地址
 *
 * @author shitouren
 * @email 3076767823@qq.com
 * @date 2023-03-28 16:52:06
 */
public interface MemberReceiveAddressService extends IService<MemberReceiveAddressEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 为用户添加收货地址
     * @param MemberReceiveAddressEntity
     * @return
     */
    RespBean addAddress(MemberReceiveAddressEntity MemberReceiveAddressEntity);


    /**
     * 设置默认地址，通过id
     * @param MemberReceiveAddressEntity
     * @return
     */
    RespBean setDefaultAddress(MemberReceiveAddressEntity MemberReceiveAddressEntity);


    /**
     * 通过会员的id获取该会员的所有地址信息
     * @param MemberReceiveAddressEntity
     * @return
     */
    RespBean getMemberAddress(MemberReceiveAddressEntity MemberReceiveAddressEntity);


    /**
     * 修改地址信息s
     * @param MemberReceiveAddressEntity
     * @return
     */
    RespBean updateAddress(MemberReceiveAddressEntity MemberReceiveAddressEntity);


    /**
     * 删除地址信息
     * @param MemberReceiveAddressEntity
     * @return
     */
    RespBean deleteAddress(MemberReceiveAddressEntity MemberReceiveAddressEntity);


    /**
     * 远程调用获取用户收货地址
     * @param addressId
     * @return
     */
    RespBean getAddressVo(long addressId, long memberId);


    /**
     * 远程调用，返回该地址是否是该用户的
     * @param memberId
     * @param addressId
     * @return
     */
    RespBean checkMemberAddress(Long memberId, Long addressId);
}

